Skip to content

ja: read exponents in Japanese - #721

Merged
NSoiffer merged 3 commits into
daisy:jafrom
yasumorishima:ja-exponents
Aug 29, 2026
Merged

ja: read exponents in Japanese#721
NSoiffer merged 3 commits into
daisy:jafrom
yasumorishima:ja-exponents

Conversation

@yasumorishima

Copy link
Copy Markdown
Contributor

Second of the small PRs from #715, and independent of #720 (different rules).

How Japanese reads an exponent

山口雄仁・川根深・澤崎陽彦「日本語による数式読み上げ法の基本構成について」日本数学教育学会誌 78(9), 239–247 (1996), item (6)

  • x² is 「x の 2 乗」 — base, の, exponent, 乗. 乗 is the closing marker, and the reference says it is spoken as a matter of course for exponents.
  • There is no ordinal form: 2 stays 2. Japanese does not say "the second power" the way English does, so ToOrdinal has nothing to build here, and the English -th pronunciation hint does not apply either.
  • When the exponent is complex, the reference switches to reading it as a superscript instead: 「の上付き … 上付き終了」.

That second tier solves the problem the English comments in these files worry about. Because 乗 already closes a simple exponent, a nested exponent would otherwise end 「… 乗 乗」 — the exact analogue of "...power power". Using 上付き for the nested case avoids it.

Changes

was now
「スクエア」 (katakana "square") 「の 2 乗」
「キューブド」 (katakana "cubed") 「の 3 乗」
「パワー」 after a simple exponent 「乗」
「パワーの」 ("power of") reordered — see below
「に上げられた」 ("was raised") 「の上付き」
「エンド指数」 「上付き終了」
「緊急事態に育つ」 「の上付き」
「力に育つ」 「の」 (with 「乗」 added to close)

The last two are worth spelling out: raised to the exponent had become 緊急事態に育つ, "to grow in an emergency", and raised to the power had become 力に育つ, "to grow into strength". Neither is about mathematics.

function-power needed reordering rather than a word swap. English puts the exponent first ("the fourth power of sine"); Japanese puts the base first — sin⁴ is 「サイン の 4 乗」 — so the rule now emits *[1], 「の」, *[2], 「乗」.

ToOrdinal and the pronounce: [text: "-th", ...] hint are removed from the power rules for the reason above. In ClearSpeak this also means $ClearSpeak_Exponents = 'Ordinal' no longer suppresses the closing 「乗」: that preference selects English's short ordinal form ("x squared" vs "x to the second power"), and Japanese has only the one form, so dropping 乗 there would leave 「x の 5」, which does not say that 5 is an exponent.

Tests

squared updated, and now checks SimpleSpeak as well as ClearSpeak. Added cubed, integer_exponent (x⁵), and variable_exponent (xⁿ), each in both styles, plus complex_exponent (x^(y+1) → 「x の上付き y プラス 1 上付き終了」) so the superscript frame is pinned too.

Not covered here: negative exponents. x⁻² currently comes out as 「x の 負の 2 乗」, and 「マイナス 2 乗」 is what the reference's worked example implies (it reads −b as 「マイナス b」). But 負の/正の is the prefix reading of negative numbers generally, and 正の is correct where it appears in general.yaml for "the set of positive integers", so that is a separate change rather than something to slip in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants